home *** CD-ROM | disk | FTP | other *** search
/ Mastering Internet Develo…oft ActiveX Technologies / Mastering Internet Development with ActiveX (1996)(Microsoft).iso / labs / lab06 / formdump / readme.txt < prev   
Encoding:
Text File  |  1996-07-16  |  3.2 KB  |  77 lines

  1. FORMDUMP - Form Decoder and Dumper, an Internet Information Server extension
  2.  
  3. This sample is a Microsoft Internet Server extension, similar to CGI
  4. extensions common to many internet servers.  FORMDUMP illustrates how
  5. to write a DLL that can be used to obtain form data from a web
  6. browser, and also how to build a reply to the form.
  7.  
  8. FORMDUMP is structured into two major parts: organizing inbound data
  9. into a memory structure, and using that data to build a HTML page.
  10. The entry point called by the server is HttpExtensionProc, and from
  11. there a set of reusable functions are called to parse inbound
  12. form data.  A list of keys is created, which allows the sample to
  13. process the data.  Finally, the HTML page is generated with a set
  14. of wrapper functions for HTML.
  15.  
  16. To build this sample, you must have the Internet SDK installed,
  17. and the environment of your compiler properly set.  A Visual C++ 
  18. 4.0 makefile is included.
  19.  
  20. The following files are included in the sample:
  21.  
  22. FORMDUMP.CPP - The main source file and entry point for the DLL.
  23.  
  24. KEYS.CPP     - A set of reusable form data decoding functions.  They
  25.                implement an interface that you can use in your own
  26.                extension.
  27.  
  28. HTML.CPP     - A set of wrappers for common HTML features.  These
  29.                wrappers can also be reused.
  30.  
  31. KEYS.H       - The header file for the external interface
  32.                implemented in KEYS.CPP.
  33.  
  34. HTML.H       - The header file for all functions available in HTML.CPP.
  35.  
  36. FORMDUMP.DEF - The definition file (one is required for all Win32 DLLs).
  37.  
  38. FORMDUMP.MAK - A Visual C++ 4.0 make file.
  39.  
  40. MAKEFILE     - A generic make file
  41.  
  42.  
  43. NOTE: The source files all have .CPP extensions, though they really don't
  44. rely on any C++ specific features.  However, you can use C++ features,
  45. and if you use any of these .CPP files, you do not need extern "C".
  46.  
  47. To Build the DLL
  48. ----------------
  49.  
  50. Simply run NMAKE in the directory containing FORMDUMP.CPP, KEYS.CPP, HTML.CPP,
  51. and so on.  You must have the multi-threaded C Runtime libraries installed,
  52. and your environment must point to:
  53.  
  54. PATH=C:\MSTOOLS\BIN;C:\COMPILER\BIN
  55. INCLUDE=C:\MSTOOLS\INCLUDE;C:\INETSDK\INCLUDE
  56. LIB=C:\MSTOOLS\LIB
  57. WWWROOT=C:\INETSRV\WWWROOT
  58. WWWSCRIPTS=C:\INETSRV\SCRIPTS
  59.  
  60. Where C:\MSTOOLS points to the Win32 SDK, C:\INETSDK points to the Internet
  61. SDK, and C:\COMPILER points to your C++ compiler.
  62.  
  63. When setting WWWROOT and WWWSCRIPTS to your Internet Information Server
  64. locations, use a local or mapped drive.  If you want to use UNC names, be
  65. careful with using a $ in the name, because NMAKE will treat it as a macro.  
  66. If you must have a $ in the environment variable, preceed it with two
  67. carets (^^$) because both the command prompt and NMAKE will convert the
  68. caret symbol.  Here is an example of how to map to \\myserver\c$: 
  69.  
  70. SET WWWROOT=\\myserver\C^^$\inetsrv\wwwroot
  71.  
  72. Another issue is the type of C Runtimes that are linked with the ISAPI 
  73. extension. Make sure the DLL version of the C Runtimes is installed on your
  74. server, in the SYSTEM32 directory.  For Visual C++, the DLLs are MSVCRT40.DLL
  75. and MSVCR40D.DLL.  If these DLLs are not available, you will see error 500
  76. when trying to access the DLL from a Web browser.
  77.